<%@ page language="java" contentType="text/html;charset=UTF-8" %>
<%@ include file="/static/include/taglib.jsp" %>
<!DOCTYPE html >
<html>
<head>
    <meta name="viewport" content="width=device-width"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>后台管理--模板编辑</title>
    <link href="${ctxStatic}/layui/css/layui.css" rel="stylesheet"/>
    <link href="${ctxStatic}/css/kpiuitanchu.css" rel="stylesheet"/>
    <script src="${ctxStatic}/js/jquery-1.8.3.min.js?v=2.0" type="text/javascript"></script>
    <script src="${ctxStatic}/layui/layui.all.js" type="text/javascript"></script>
    <style>
        .kq {
            color: #ffffff;
            width: 76%;
            margin: 0 auto;
            margin-top: 10px
        }

        .kq table tr {
            height: 40px
        }
    </style>
</head>
<body>
<form class="layui-form" id="formedit" name="formedit" action="add_attbmhznodetail" method="post"
      target="d41d8cd98f00b204e9800998ecf8427e">
    <iframe name="d41d8cd98f00b204e9800998ecf8427e" src="about:blank" style="display:none;"></iframe>

    <div style="padding:10px;margin:0 auto;width:76%;">
        <span style="font-size:12px;font-weight: bold;color:#B8E986">${sumentity.year } 年  ${sumentity.mouth } 月 </span>
        <span style="font-size:12px;font-weight: bold;color:#ffffff;margin-left:50px;">部门：</span>
        <span style="font-size:12px;font-weight: bold;color:#B8E986">${userentity.orgname }</span>
        <span style="font-size:12px;font-weight: bold;margin-left:50px;color:#ffffff">身份证号：</span>
        <span style="font-size:12px;font-weight: bold;color:#B8E986">${userentity.cardno }</span>
        <span style="font-size:12px;font-weight: bold;margin-left:50px;color:#ffffff">姓名：</span>
        <span style="font-size:12px;font-weight: bold;color:#B8E986">${userentity.realname }</span>
    </div>

    <div style="" class="kq">
        <table>
            <!-- <tr>
					  <td style="width:100px;text-align: right">出勤天数：</td>
					   <td style="width:100px"><input name="cqts" lay-verify="tsset" class="layui-input" type="text" value="${sumentity.cqts }"></td> 
					  
					  
					  </tr>-->
            <tr>
                <td style="width:100px;text-align: right">年休假天数：</td>
                <td style="width:100px"><input name="xjts" lay-verify="tsset" class="layui-input"
                                               onchange="nxjChange(this)" type="text" value="${sumentity.xjts }"></td>
                <td style="width:100px;text-align: right">探亲假天数：</td>
                <td style="width:100px"><input name="tqjts" lay-verify="tsset" class="layui-input" type="text"
                                               value="${sumentity.tqjts }"></td>
                <td style="width:100px;text-align: right">婚假天数：</td>
                <td style="width:100px"><input name="hjts" lay-verify="tsset" class="layui-input" type="text"
                                               value="${sumentity.hjts }"></td>

            </tr>
            <tr>
                <td style="width:100px;text-align: right">丧假天数：</td>
                <td style="width:100px"><input name="sangjts" lay-verify="tsset" class="layui-input" type="text"
                                               value="${sumentity.sangjts }"></td>
                <td style="width:100px;text-align: right">病假天数：</td>
                <td style="width:100px"><input name="bjts" lay-verify="tsset" class="layui-input" type="text"
                                               value="${sumentity.bjts }"></td>
                <td style="width:100px;text-align: right">生育假天数：</td>
                <td style="width:100px"><input name="syjts" lay-verify="tsset" class="layui-input" type="text"
                                               value="${sumentity.syjts }"></td>

            </tr>
            <tr>
                <td style="width:100px;text-align: right">事假天数：</td>
                <td style="width:100px"><input name="sjts" lay-verify="tsset" class="layui-input" type="text"
                                               value="${sumentity.sjts }"></td>
                <td style="width:100px;text-align: right">因公致伤天数：</td>
                <td style="width:100px"><input name="gsts" lay-verify="tsset" class="layui-input" type="text"
                                               value="${sumentity.gsts }"></td>
                <td style="width:100px;text-align: right">其他：</td>
                <td style="width:100px"><input name="qtts" lay-verify="tsset" class="layui-input" type="text"
                                               value="${sumentity.qtts }"></td>

            </tr>

            <tr>
                <td style="width:100px;text-align: right">迟到次数：</td>
                <td style="width:100px"><input name="cdcc" lay-verify="tezs" class="layui-input" type="text"
                                               value="${sumentity.cdcc }"></td>
                <td style="width:100px;text-align: right">早退次数：</td>
                <td style="width:100px"><input name="ztcc" lay-verify="tezs" class="layui-input" type="text"
                                               value="${sumentity.ztcc }"></td>
                <td style="width:100px;text-align: right">旷工次数：</td>
                <td style="width:100px"><input name="kgcs" lay-verify="tezs" class="layui-input" type="text"
                                               value="${sumentity.kgcs }"></td>
            </tr>
            <tr>
                <td style="width:100px;text-align: right">是否加班：</td>
                <td style="width:100px" colspan="2">
                    <c:if test="${sumentity.sfjb == 0}">
                        <input type="radio" name="sfjb" value="0" lay-filter="sfjb" title="否" checked="">
                        <input type="radio" name="sfjb" value="1" lay-filter="sfjb" title="是">
                    </c:if>
                    <c:if test="${sumentity.sfjb == 1}">
                        <input type="radio" name="sfjb" value="0" lay-filter="sfjb" title="否">
                        <input type="radio" name="sfjb" value="1" lay-filter="sfjb" title="是" checked="">
                    </c:if>
                </td>

            </tr>
            <tr>
                <td>备注：</td>
                <td style="" colspan="5">
                    <textarea class="layui-textarea" name="remark">${sumentity.remark}</textarea>
                </td>
            </tr>

        </table>
    </div>

    <div style="width:87%;text-align: center;margin:0 auto;margin-top:10px;">
        <button class="button" lay-submit="" lay-filter="demo1" id="btnsave" style="margin-right:100px">保存</button>
        <input type="button" class="button" value="关闭" onclick="top.CloseOpenWindow()"/>
    </div>
    <input type="hidden" name="attsummaryid" value="${attsummaryid}">
</form>

<script>

    function nxjChange(obj) {


        if ($(obj).val() > 15) {

            layer.msg('年休假最多15天', {icon: 0})

        }

    }

    layui.use('form', function () {
        var form = layui.form;

        form.verify({
            tsset: function (value, demo) {
                if (value == '') {
                    return '必填项不能为空';
                }
                var reg = /^[0-9]+([.]{1}[0-9]+){0,1}$/;
                if (!reg.test(value)) {
                    return '必须是数字';
                }
            },
            tezs: function (value, demo) {
                if (value == '') {
                    return '必填项不能为空';
                }
                var reg = /^\d+$/;
                if (!reg.test(value)) {
                    return '必须是数字';
                }
            }
        })

        form.render();
    })

    function CloseDialog(result, msg) {
        top.frames["iframe"].vAttBmHz.addresult(result, msg);
    }

    function CloseDialog1() {

        layer.msg('年休假最多15天', {icon: 0})

    }
</script>
</body>
</html>